Multi-dimensional Rankings, Program Termination, and Complexity Bounds of Flowchart Programs

نویسندگان

  • Christophe Alias
  • Alain Darte
  • Paul Feautrier
  • Laure Gonnord
چکیده

Proving the termination of a flowchart program can be done by exhibiting a ranking function, i.e., a function from the program states to a wellfounded set, which strictly decreases at each program step. A standard method to automatically generate such a function is to compute invariants for each program point and to search for a ranking in a restricted class of functions that can be handled with linear programming techniques. Previous algorithms based on affine rankings either are applicable only to simple loops (i.e., single-node flowcharts) and rely on enumeration, or are not complete in the sense that they are not guaranteed to find a ranking in the class of functions they consider, if one exists. Our first contribution is to propose an efficient algorithm to compute ranking functions: It can handle flowcharts of arbitrary structure, the class of candidate rankings it explores is larger, and our method, although greedy, is provably complete. Our second contribution is to show how to use the ranking functions we generate to get upper bounds for the computational complexity (number of transitions) of the source program. This estimate is a polynomial, which means that we can handle programs with more than linear complexity. We applied the method on a collection of test cases from the literature. We also show the links and differences with previous techniques based on the insertion of counters.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Program Termination and Worst Time Complexity with Multi-Dimensional Affine Ranking Functions

A standard method for proving the termination of a flowchart program is to exhibit a ranking function, i.e., a function from the program states to a well-founded set, which strictly decreases at each program step. Our main contribution is to give an efficient algorithm for the automatic generation of multi-dimensional affine nonnegative ranking functions, a restricted class of ranking functions...

متن کامل

Bounding the Computational Complexity of Flowchart Programs with Multi-dimensional Rankings

Proving the termination of a flowchart program can be done by exhibiting a ranking function, i.e., a function from the program states to a well-founded set, which strictly decreases at each program step. A standard method to automatically generate such a function is to compute invariants for each program point and to search for a ranking in a restricted class of functions that can be handled wi...

متن کامل

On Termination of Constraint Logic Programs

This paper introduces a necessary and sufficient condition for termination of constraint logic programs. The method is based on assigning a dataflow graph to a program, whose nodes are the program points and whose arcs are abstractions of the rules of a transition system, describing the operational behaviour of constraint logic programs. Then termination is proven using a technique inspired by ...

متن کامل

On Termination of Constraint Logic Programs

Abst rac t . This paper introduces a necessary and sufficient condition for termination of constraint logic programs. The method is based on assigning a dataflow graph to a program, whose nodes are the program points and whose arcs are abstractions of the rules of a transition system, describing the operational behaviour of constraint logic programs. Then termination is proven using a technique...

متن کامل

Complexity Bounds for Ordinal-Based Termination

‘What more than its truth do we know if we have a proof of a theorem in a given formal system?’ We examine Kreisel’s question in the particular context of program termination proofs, with an eye to deriving complexity bounds on program running times. Our main tool for this are length function theorems, which provide complexity bounds on the use of well quasi orders. We illustrate how to prove s...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010